#include "stdafx.h"
#include "TBSVersion.h"

namespace AppliedCryptography
{
	TBSVersion::TBSVersion(ClassBits classBits, ConstructedBit constucted, TypeNumberBits number)
		: ASN1Integer(classBits, constucted, number)
	{
	};

	TBSVersion::TBSVersion(ClassBits classBits, ConstructedBit constucted, TypeNumberBits number, versionNo value)
		: ASN1Integer(classBits, constucted, number, value)
	{
	};

	TBSVersion::TBSVersion()
		: ASN1Integer(ContextSpec, Constructed, Explicit00)
	{
	};

	TBSVersion::TBSVersion(versionNo value)
		: ASN1Integer(ContextSpec, Constructed, Explicit00, value)
	{
	};


	std::vector<byte> TBSVersion::getContentBits() const
	{
		ASN1Integer i(this->get());
		return i.encode();
	};
}; // namespace AppliedCryptography
